div.body {
  padding: 10px;
}

// hljs
.wiki {
  @import 'hljs';
}

.wiki {
  font-size: 15px;
  line-height: 1.8em;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 1.6em;
    margin-bottom: 0.8em;

    &:first-child {
      margin-top: 0;
    }
  }

  h1 {
    padding-bottom: 0.3em;
    margin-top: 2em;
    font-size: 1.8em;
    line-height: 1.1em;
    border-bottom: solid 1px transparent;
  }
  h2 {
    padding-bottom: 0.5em;
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1.225;
    border-bottom: 1px solid transparent;
  }
  h3 {
    font-size: 1.2em;
    font-weight: bold;
  }
  h4 {
    font-size: 1.1em;
    font-weight: normal;
  }
  h5 {
    font-size: 1.05em;
    font-weight: normal;
  }

  p {
    margin: 15px 0;
    font-weight: normal;
  }
  blockquote {
    padding: 0 20px;
    margin: 0 0 30px 0;
    font-size: 0.9em;
    color: lighten($gray-dark, 35%);
  }

  img {
    max-width: 100%;
    margin: 5px 0;
  }

  img.emojione {
    margin-top: -0.3em !important;
    margin-bottom: 0 !important;
    border: none;
    box-shadow: none;
  }

  ul,
  ol {
    padding-left: 30px;
    margin: 20px 0;

    li {
      margin: 5px 0;
      line-height: 1.8em;
    }

    ul,
    ol {
      margin: 0;
    }
  }

  .task-list {
    .task-list-item {
      margin: 0 0.2em 0.25em -1.6em;
      list-style-type: none;
    }
    .task-list-item > .task-list {
      margin-left: 30px;
    }
    // use awesome-bootstrap-checkbox
    .task-list-item .checkbox input[type='checkbox'] {
      // layout
      + label {
        padding-left: 0.3em;
        &:before {
          margin-top: 0.4em;
        }
      }
      // styles
      cursor: default;
      + label {
        cursor: default;
        opacity: 1;
        &:before,
        &:after {
          cursor: default;
        }
      }
    }
  }

  // only inline code blocks
  p code {
    font-family: $font-family-monospace-not-strictly;
  }

  .page-template-builder {
    position: relative;

    .template-create-button {
      position: absolute;
      top: 8px;
      right: 8px;
    }
  }

  .highlighted {
    background-color: $brand-warning;
  }

  .revision-head {
    a {
      text-decoration: none;
    }

    .revision-head-link,
    .revision-head-edit-button {
      margin-left: 0.5em;
      font-size: 0.6em;
      opacity: 0;
    }
    &:hover .revision-head-link,
    &:hover .revision-head-edit-button {
      opacity: 1 !important;
    }
  }

  $ratio: 0.95;
  &.comment {
    font-size: 14px;
    line-height: 1.5em;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin-top: 1.6em * $ratio;
      margin-bottom: 0.8em * $ratio;

      &:first-child {
        margin-top: 15px;
      }
    }

    h1 {
      padding-bottom: 0.3em * $ratio;
      margin-top: 2em * $ratio;
      font-size: 1.8em * $ratio;
      line-height: 1.1em * $ratio;
    }
    h2 {
      padding-bottom: 0.5em * $ratio;
      font-size: 1.4em * $ratio;
      line-height: 1.225 * $ratio;
    }
    h3 {
      font-size: 1.2em * $ratio;
    }

    blockquote {
      font-size: 0.9em * $ratio;
    }

    img.emojione {
      margin-top: -0.3em * $ratio !important;
    }

    ul,
    ol {
      padding-left: 15px;
      margin: 10px 0;

      li {
        line-height: 1.1em;
      }
    }

    .revision-head {
      .revision-head-link,
      .revision-head-edit-button {
        margin-left: 0.5em * $ratio;
        font-size: 0.6em * $ratio;
      }
    }
  }
}

// mobile
.page-mobile .wiki .revision-head {
  .revision-head-link,
  .revision-head-edit-button {
    opacity: 0.3;
  }
}

// tablet and iphone size
@media (max-width: $screen-sm-max) {
  .main-container .main .wiki {
    img {
      max-width: 100%;
    }
  }
}
